import http from '@/utils/http.js'

// 获取首页轮播图数据
export const getHomeBanner = (distributionSite = 1) => http({
	url: '/home/banner',
	method: 'GET',
	data: {
		distributionSite // 获取数据的类型，默认为1，表示获取首页轮播图数据,如果是2，获取的是分类页面轮播图的数据
	}
})

// 首页前台类目数据
export const getHomeCateScroll = () => http({
	method: 'GET',
	url: '/home/category/mutli'
})

// 获取热门推荐数据
export const getHotApi = () => http({
	method: 'GET',
	url: '/home/hot/mutli'
})

// 新鲜好物
export const getHomeNew = (limit = 4) => http({
	url: "/home/new",
	data: {
		limit
	}
});

// src/services/home.js
/**
 * 猜你喜欢-小程序
 */
export const getHomeGoodsGuessLikeAPI = (data) => {
	return http({
		method: 'GET',
		url: '/home/goods/guessLike',
		data,
	})
}